package com.ailanyin.modules.flowable.mapper;

import com.ailanyin.modules.flowable.domain.WfDeployForm;
import com.ailanyin.modules.flowable.domain.vo.WfDeployFormVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ailanyin
 * @version 1.0
 * @since 2022/12/12 0012 下午 15:04
 */
public interface WfDeployFormMapper {

    /**
     * 查询流程关联表单
     *
     * @param deployId deployId
     * @param formKey formKey
     * @param nodeKey nodeKey
     * @return vo
     */
    WfDeployFormVo selectWfDeployForm(@Param("deployId") String deployId, @Param("formKey") String formKey, @Param("nodeKey") String nodeKey);

    /**
     * 批量新增流程实例关联单
     *
     * @param list list 流程实例关联单集合
     * @return 结果
     */
    int insertBatch(@Param("list") List<WfDeployForm> list);

    /**
     * 通过 deployId 删除
     * @param deployId deployId
     */
    void deleteByDeployId(String deployId);

    /**
     * 新增流程实例关联单
     *
     * @param deployForm deployForm
     * @return 结果
     */
    int insert(WfDeployForm deployForm);
}
